package calender;

import utils.DateUtils;

import java.util.Date;

/**
 * @PackageName: calender
 * @ClassName:
 * @author: wxc
 * @date 2021/5/27 javawe
 */
public class javawe {
    public static void main(String[] args) {
        String startTime="2021-05-27 16:33:13";
        String endTime="2021-05-27 16:34:13";

        Date date = new Date();
        String s = DateUtils.formatDateToString(date, DateUtils.DATE_FORMAT_FULL);
        Date dateStartTime = DateUtils.formatStringToDate(startTime, DateUtils.DATE_FORMAT_FULL);
        Date dateEndTime = DateUtils.formatStringToDate(endTime, DateUtils.DATE_FORMAT_FULL);
        if (date.getTime()>dateStartTime.getTime() && date.getTime()<dateEndTime.getTime()) {
            System.out.println("正确");
        }
        System.out.println(s);
    }
}
